package com.mit.common.design.dto;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.ArrayUtils;

import com.mit.common.Constants;
import com.mit.common.dto.AbstractDTO;
import com.mit.common.maintenance.dto.ProductColorDTO;

public class StyleDTO extends AbstractDTO {
	private String code;
	private int year;
	private int season;
	private int prodTypeId;
	private String prodTypeName;
	private String sizeGroup;
	private String name;
	private String gift;
	private int designerId;
	private String designerName;
	private String sampleSize;
	private String remarks;
	private String specInd;
	private String technicalReq;
	private String endReq;
	private String specialReq;
	private String img;
	private Date creationDate;
	private Date approvalDate;
	private String state;
	private List<ProductColorDTO> colors;
	private List<FabricDTO> primaryFab;
	private List<FabricDTO> secondaryFab;
	private List<String> sizes;
	//manually implement getter & setter
	//private List<String> sizeFields;
	private String s01;
	private String s02;
	private String s03;
	private String s04;
	private String s05;
	private String s06;
	private String s07;
	private String s08;
	private String s09;
	private String s10;

	//布版
	private BigDecimal 	estimatedFee;
	private Integer sampleWorker;
	private String sampleWorkerName;
	private String sampleState;
	private String dressState;
	
	//专机
	private String specialProgressState;
	private Integer factoryId;
	private String factoryName;

	//生产次数
	private Integer moCount;
	
	public List<String> getSizeFields() {
		ArrayList<String> rtn = new ArrayList<String>();
		if(Constants.DB_YES.equalsIgnoreCase(s01))
			rtn.add("s01");
		if(Constants.DB_YES.equalsIgnoreCase(s02))
			rtn.add("s02");
		if(Constants.DB_YES.equalsIgnoreCase(s03))
			rtn.add("s03");
		if(Constants.DB_YES.equalsIgnoreCase(s04))
			rtn.add("s04");
		if(Constants.DB_YES.equalsIgnoreCase(s05))
			rtn.add("s05");
		if(Constants.DB_YES.equalsIgnoreCase(s06))
			rtn.add("s06");
		if(Constants.DB_YES.equalsIgnoreCase(s07))
			rtn.add("s07");
		if(Constants.DB_YES.equalsIgnoreCase(s08))
			rtn.add("s08");
		if(Constants.DB_YES.equalsIgnoreCase(s09))
			rtn.add("s09");
		if(Constants.DB_YES.equalsIgnoreCase(s10))
			rtn.add("s10");		
		return rtn;
	}
	public void setSizeFields(List<String> sizeFields) {
				
		
		s01 = (sizeFields.contains("s01")) ? Constants.DB_YES   :Constants.DB_NO;
		s02 = (sizeFields.contains("s02")) ? Constants.DB_YES   :Constants.DB_NO;
		s03 = (sizeFields.contains("s03")) ? Constants.DB_YES   :Constants.DB_NO;
		s04 = (sizeFields.contains("s04")) ? Constants.DB_YES   :Constants.DB_NO;
		s05 = (sizeFields.contains("s05")) ? Constants.DB_YES   :Constants.DB_NO;
		s06 = (sizeFields.contains("s06")) ? Constants.DB_YES   :Constants.DB_NO;
		s07 = (sizeFields.contains("s07")) ? Constants.DB_YES   :Constants.DB_NO;
		s08 = (sizeFields.contains("s08")) ? Constants.DB_YES   :Constants.DB_NO;
		s09 = (sizeFields.contains("s09")) ? Constants.DB_YES   :Constants.DB_NO;
		s10 = (sizeFields.contains("s10")) ? Constants.DB_YES   :Constants.DB_NO;
	
	}
	
	public Integer getMoCount() {
		return moCount;
	}
	public void setMoCount(Integer moCount) {
		this.moCount = moCount;
	}
	public String getSampleSize() {
		return sampleSize;
	}
	public void setSampleSize(String sampleSize) {
		this.sampleSize = sampleSize;
	}

	public List<ProductColorDTO> getColors() {
		return colors;
	}
	public List<FabricDTO> getPrimaryFab() {
		return primaryFab;
	}
	public List<FabricDTO> getSecondaryFab() {
		return secondaryFab;
	}
	public List<String> getSizes() {
		return sizes;
	}
	public void setSizes(List<String> sizes) {
		this.sizes = sizes;
	}
	public BigDecimal getEstimatedFee() {
		return estimatedFee;
	}
	public void setEstimatedFee(BigDecimal estimatedFee) {
		this.estimatedFee = estimatedFee;
	}
	public void setColors(List<ProductColorDTO> colors) {
		this.colors = colors;
	}
	public void setPrimaryFab(List<FabricDTO> primaryFab) {
		this.primaryFab = primaryFab;
	}
	public void setSecondaryFab(List<FabricDTO> secondaryFab) {
		this.secondaryFab = secondaryFab;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getSeason() {
		return season;
	}
	public void setSeason(int season) {
		this.season = season;
	}
	public int getProdTypeId() {
		return prodTypeId;
	}
	public void setProdTypeId(int prodTypeId) {
		this.prodTypeId = prodTypeId;
	}
	public String getProdTypeName() {
		return prodTypeName;
	}
	public void setProdTypeName(String prodTypeName) {
		this.prodTypeName = prodTypeName;
	}
	public String getSizeGroup() {
		return sizeGroup;
	}
	public void setSizeGroup(String sizeGroup) {
		this.sizeGroup = sizeGroup;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getGift() {
		return gift;
	}
	public void setGift(String gift) {
		this.gift = gift;
	}
	public int getDesignerId() {
		return designerId;
	}
	public void setDesignerId(int designerId) {
		this.designerId = designerId;
	}
	public String getDesignerName() {
		return designerName;
	}
	public void setDesignerName(String designerName) {
		this.designerName = designerName;
	}
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	public String getSpecInd() {
		return specInd;
	}
	public void setSpecInd(String specInd) {
		this.specInd = specInd;
	}
	public String getTechnicalReq() {
		return technicalReq;
	}
	public void setTechnicalReq(String technicalReq) {
		this.technicalReq = technicalReq;
	}
	public String getEndReq() {
		return endReq;
	}
	public void setEndReq(String endReq) {
		this.endReq = endReq;
	}
	public String getSpecialReq() {
		return specialReq;
	}
	public void setSpecialReq(String specialReq) {
		this.specialReq = specialReq;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	public Date getCreationDate() {
		return creationDate;
	}
	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}
	public Date getApprovalDate() {
		return approvalDate;
	}
	public void setApprovalDate(Date approvalDate) {
		this.approvalDate = approvalDate;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getS01() {
		return s01;
	}
	public void setS01(String s01) {
		this.s01 = s01;
	}
	public String getS02() {
		return s02;
	}
	public void setS02(String s02) {
		this.s02 = s02;
	}
	public String getS03() {
		return s03;
	}
	public void setS03(String s03) {
		this.s03 = s03;
	}
	public String getS04() {
		return s04;
	}
	public void setS04(String s04) {
		this.s04 = s04;
	}
	public String getS05() {
		return s05;
	}
	public void setS05(String s05) {
		this.s05 = s05;
	}
	public String getS06() {
		return s06;
	}
	public void setS06(String s06) {
		this.s06 = s06;
	}
	public String getS07() {
		return s07;
	}
	public void setS07(String s07) {
		this.s07 = s07;
	}
	public String getS08() {
		return s08;
	}
	public void setS08(String s08) {
		this.s08 = s08;
	}
	public String getS09() {
		return s09;
	}
	public void setS09(String s09) {
		this.s09 = s09;
	}
	public String getS10() {
		return s10;
	}
	public void setS10(String s10) {
		this.s10 = s10;
	}
	public Integer getSampleWorker() {
		return sampleWorker;
	}
	public void setSampleWorker(Integer sampleWorker) {
		this.sampleWorker = sampleWorker;
	}
	public String getSampleWorkerName() {
		return sampleWorkerName;
	}
	public void setSampleWorkerName(String sampleWorkerName) {
		this.sampleWorkerName = sampleWorkerName;
	}
	public String getSampleState() {
		return sampleState;
	}
	public void setSampleState(String sampleState) {
		this.sampleState = sampleState;
	}
	public String getDressState() {
		return dressState;
	}
	public void setDressState(String dressState) {
		this.dressState = dressState;
	}
	public String getSpecialProgressState() {
		return specialProgressState;
	}
	public void setSpecialProgressState(String specialProgressState) {
		this.specialProgressState = specialProgressState;
	}
	public Integer getFactoryId() {
		return factoryId;
	}
	public void setFactoryId(Integer factoryId) {
		this.factoryId = factoryId;
	}
	public String getFactoryName() {
		return factoryName;
	}
	public void setFactoryName(String factoryName) {
		this.factoryName = factoryName;
	}

	
	
}
